home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / uiophysio.z / uiophysio
Encoding:
Text File  |  1998-10-30  |  5.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX))))                                                  uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo - set up user data space for I/O
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_bbbb_uuuu_ffff_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_uuuu_iiii_oooo_...._hhhh_>>>>
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  16.  
  17.      _iiii_nnnn_tttt _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo_((((_iiii_nnnn_tttt _((((_****_s_t_r_a_t_))))_((((_ssss_tttt_rrrr_uuuu_cccc_tttt _bbbb_uuuu_ffff _****_))))_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _bbbb_uuuu_ffff _****_b_p_,,,, _dddd_eeee_vvvv______tttt _d_e_v_,,,,
  18.           _iiii_nnnn_tttt _r_w_f_l_a_g_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _uuuu_iiii_oooo _****_u_i_o_p_))))_;;;;
  19.  
  20.    AAAArrrrgggguuuummmmeeeennnnttttssss
  21.      _s_t_r_a_t
  22.           Address of the driver routine.
  23.  
  24.      _b_p   Pointer to the _bbbb_uuuu_ffff(D4) structure describing the I/O request.
  25.  
  26.      _d_e_v  External device number.
  27.  
  28.      _r_w_f_l_a_g
  29.           Flag indicating whether the access is a read or a write.
  30.  
  31.      _u_i_o_p Pointer to the _uuuu_iiii_oooo(D4) structure that defines the user space of the
  32.           I/O request.
  33.  
  34. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.      _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo prepares the user's address space for DMA I/O and encapsulates
  36.      the transfer information in a buffer header.
  37.  
  38.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  39.      _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo returns 0 if the result is successful, or the appropriate error
  40.      number on failure. If a partial transfer occurs, the _u_i_o structure is
  41.      updated to indicate the amount not transferred and an error is returned.
  42.      _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo returns the _E_N_O_S_P_C error if an attempt is made to read beyond
  43.      the end of the device. If a read is performed at the end of the device, 0
  44.      is returned. _E_N_O_S_P_C is also returned if an attempt is made to write at or
  45.      beyond the end of a the device. _E_F_A_U_L_T is returned if user memory is not
  46.      valid. _E_A_G_A_I_N is returned if _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo could not lock all of the pages.
  47.  
  48. UUUUSSSSAAAAGGGGEEEE
  49.      _uuuu_iiii_oooo_pppp_hhhh_yyyy_ssss_iiii_oooo performs the following functions:
  50.  
  51.      +o    Sets up a buffer header describing the transfer; faults pages in and
  52.           locks the pages impacted by the I/O transfer so they can't be
  53.           swapped out
  54.  
  55.      +o    Calls the routine named in the _s_t_r_a_t parameter, passing a pointer to
  56.           a _b_u_f structure
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX))))                                                  uuuuiiiioooopppphhhhyyyyssssiiiioooo((((DDDD3333XXXX))))
  71.  
  72.  
  73.  
  74.      +o    Sleeps until the transfer is complete and is awakened by a call to
  75.           _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3) from the driver's I/O completion handler
  76.  
  77.      +o    Performs the necessary cleanup and updates, then returns to the
  78.           driver routine
  79.  
  80.      If _b_p is set to _N_U_L_L, a buffer is allocated temporarily and freed after
  81.      the transfer completes.
  82.  
  83.      If _r_w_f_l_a_g is set to _B__R_E_A_D, the direction of the data transfer will be
  84.      from the kernel or device to the user's buffer. If _r_w_f_l_a_g is set to
  85.      _B__W_R_I_T_E, the direction of the data transfer will be from the user's
  86.      buffer to the kernel or device.
  87.  
  88.    LLLLeeeevvvveeeellll
  89.      Base only.
  90.  
  91.    SSSSeeeeeeee AAAAllllssssoooo
  92.      _bbbb_uuuu_ffff(D4), _iiii_oooo_cccc_tttt_llll(D2), _rrrr_eeee_aaaa_dddd(D2), _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2), _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk(D3), _uuuu_iiii_oooo(D4),
  93.      _wwww_rrrr_iiii_tttt_eeee(D2)
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.